Ensure Ray shutdown between tests, remove deprecated imports, and update README#13
Open
MayarMAhmed wants to merge 7 commits intomainfrom
Open
Ensure Ray shutdown between tests, remove deprecated imports, and update README#13MayarMAhmed wants to merge 7 commits intomainfrom
MayarMAhmed wants to merge 7 commits intomainfrom
Conversation
Closed
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13 +/- ##
==========================================
- Coverage 79.01% 78.98% -0.04%
==========================================
Files 15 15
Lines 1158 1161 +3
Branches 162 163 +1
==========================================
+ Hits 915 917 +2
Misses 180 180
- Partials 63 64 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR tightens Ray cleanup in the test suite, removes deprecated
typingimports in favor ofcollections.abc, and restructures the README for clarity.All existing tests pass.
Motivation
The previous
conftest.pyshut down Ray once at session end viapytest_sessionfinish. This works, but if a test leaves a Ray context running, every subsequent test inherits that state. Moving shutdown to a per-testautousefixture is a low-cost sanity measure that ensures each test starts with a clean slate.Separately, Python 3.9+ moved
Generatorand other generic types intocollections.abc, and importing them fromtypinghas been deprecated since Python 3.11. These imports producedDeprecatedSince211warnings.The README also needed restructuring: the Development section appeared before Installation (confusing for new users), several sentences were incomplete or had typos, and section headings were inconsistent.
Changes by file
tests/conftest.py— Ray lifecycle managementpytest_sessionfinishhook; addsautouse=Trueshutdown_ray_after_testfixture that yields, then callsray.shutdown()if Ray is initialized. Ensures each test starts with a clean Ray state.povme/parallel.py— Deprecated import cleanup + guardrailGeneratorimporttyping.Generator→collections.abc.Generatorn_coreswarningn_cores > 1butuse_ray is False, since tasks will run sequentially regardlesspovme/pocket/volume.py— Deprecated import cleanupGeneratorimporttyping.Generator→collections.abc.GeneratorREADME.md— Restructure and completepip install .withpixi install; addpixi shellactivation stepconda createblock for legacyv2.2.2installs that don't have apixi.tomlpovme" sentence; addPOVME2.pyusage and--testflag for tagged versionspixi.lock— Regenerated to reflect dependency changes from #12.